﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace XrayDirection.DAL.Migrations
{
    /// <inheritdoc />
    public partial class InitialCreateOrder : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "AlarmRecords",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AlarmCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SolutionHelp = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AlarmRecords", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "InputOrders",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RecipeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LongLengthX = table.Column<double>(type: "float", nullable: false),
                    ShortLengthY = table.Column<double>(type: "float", nullable: false),
                    FrontEdgeDisD = table.Column<double>(type: "float", nullable: false),
                    DirectHoleDisF = table.Column<double>(type: "float", nullable: false),
                    MoveOffset = table.Column<double>(type: "float", nullable: false),
                    CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InputOrders", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Orders",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RecipeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LongLengthX = table.Column<double>(type: "float", nullable: false),
                    ShortLengthY = table.Column<double>(type: "float", nullable: false),
                    FrontEdgeDisD = table.Column<double>(type: "float", nullable: false),
                    DirectHoleDisF = table.Column<double>(type: "float", nullable: false),
                    MoveOffset = table.Column<double>(type: "float", nullable: false),
                    MoveOffset02 = table.Column<double>(type: "float", nullable: false),
                    OkCount = table.Column<int>(type: "int", nullable: false),
                    FailCount = table.Column<int>(type: "int", nullable: false),
                    Count = table.Column<int>(type: "int", nullable: false),
                    CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Orders", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "WorkingInfos",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WorkingRecipeId = table.Column<int>(type: "int", nullable: false),
                    WorkingRecipeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BorderIndex = table.Column<int>(type: "int", nullable: false),
                    BorderIndexMax = table.Column<int>(type: "int", nullable: false),
                    TemplateWidth = table.Column<int>(type: "int", nullable: false),
                    TemplateHeight = table.Column<int>(type: "int", nullable: false),
                    CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WorkingInfos", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AlarmRecords");

            migrationBuilder.DropTable(
                name: "InputOrders");

            migrationBuilder.DropTable(
                name: "Orders");

            migrationBuilder.DropTable(
                name: "WorkingInfos");
        }
    }
}
